package com.galaxy.samson.staff.service;

import com.galaxy.samson.staff.dao.IStaffDao;
import com.galaxy.samson.staff.domain.Staff;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: madasamy
 * Date: 2/12/12
 * Time: 3:44 PM
 * To change this template use File | Settings | File Templates.
 */
@Transactional
public class StaffService implements IStaffService
{

    private IStaffDao staffDao;
    
    public IStaffDao getStaffDao()
    {
        return staffDao;
    }

    public void setStaffDao(IStaffDao staffDao)
    {
        this.staffDao = staffDao;
    }

    @Override
    public void create(Staff staff)
    {
      staffDao.create(staff);  
    }

    @Override
    public List<Staff> findAll()
    {
        return staffDao.findAll();
     }

    @Override
    public void removeAll()
     {
        staffDao.removeAll();
    }

    @Override
    public void remove(String name)
    {
        staffDao.remove(name);
    }
}
